package db.tables;

import java.sql.SQLException;

import org.hsqldb.Types;

import db.DBObject;

public class DBWorkTable extends DBObject {
	
	public static final String TABLE_NAME="work";
	
	public static final String WORK_ID_COL = TABLE_NAME+"_id",
			WORK_NAME_COL = TABLE_NAME+"_name", 
			TOWN_ID_COL=DBTownTable.TOWN_ID_COL;

	public DBWorkTable() throws ClassNotFoundException, SQLException {
		super(TABLE_NAME, new Object[][] {
				{ WORK_ID_COL, Types.BIGINT, SQL_IDENTITY_PRIMARY_KEY, "" },
				{ WORK_NAME_COL, Types.VARCHAR, SQL_NOT_NULL, "" },
				{ TOWN_ID_COL, Types.BIGINT, 
					getSQLForeignKeyReference(DBTownTable.TABLE_NAME, TOWN_ID_COL),"" }});
	}
}
